<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>17.时间转换</title>
</head>
<body>
    <script>
        let second = prompt('输入秒数')
        function getTine(t){
            h = parseInt(t / 60 / 60 % 24)
            m = parseInt(t / 60 % 60)
            s = parseInt(t % 60)
            h = h < 10 ? '0' + h : h
            m = m < 10 ? '0' + m : m
            s = s < 10 ? '0' + s : s
            return `${h} : ${m} : ${s}`
        }
        let str = getTine(second)
        document.write(str)
    </script>
</body>
</html>